package me.zhengjie.modules.mnt.websocket;

public class Thread01 extends Thread{

    private  String name;
    public Thread01 (String name){
        this.name=name;
    }
    @Override
    public void run() {
        super.run();
        for (int i = 0; i < 5; i++) {
            System.out.println(this.name +"   运行索引"+i);
            try {
                sleep(500);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }

    }

    public static void main(String[] args) {
        Thread01 thread01 = new Thread01("羊");
        Thread01 thread02 = new Thread01("虎");

        thread01.start();
        thread02.start();

    }
}
